package com.neuronbit.businessflow.intellij.model;

import com.neuronbit.businessflow.intellij.model.annotation.HiddenProperty;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

/**
 * The type Switch task.
 */
public class SwitchTask extends JavaMethodTask implements Serializable {
    private List<EnumItem> enumItems;

    /**
     * Instantiates a new Switch task.
     */
    public SwitchTask() {
        super(null, "Switch", NodeType.SWITCH_TASK);
    }

    /**
     * Instantiates a new Switch task.
     *
     * @param id   the id
     * @param name the name
     */
    public SwitchTask(String id, String name) {
        this(id, name, Collections.emptyList());
    }

    /**
     * Instantiates a new Switch task.
     *
     * @param id        the id
     * @param name      the name
     * @param enumItems the enum items
     */
    public SwitchTask(String id, String name, List<EnumItem> enumItems) {
        super(id, name, NodeType.SWITCH_TASK);
        this.enumItems = enumItems;
    }

    /**
     * Sets enum items.
     *
     * @param enumItems the enum items
     */
    @HiddenProperty
    public void setEnumItems(List<EnumItem> enumItems) {
        this.enumItems = enumItems;
    }

    /**
     * Gets enum items.
     *
     * @return the enum items
     */
    public List<EnumItem> getEnumItems() {
        return enumItems;
    }
}
